public class demo3 {
    public static void main(String[] args) {
        double a=2;
        double b=3;
        san(a,b);
        double c=4;
        double d=5;
        chang(c,d);
        double f=5;
        zheng(f);
    }
    public static void san(double a,double b){
        double S1=a*b/2;
        System.out.println("三角形的面积为:"+S1);
    }
    public static void chang(double c,double d){
        double S2=c*d;
        System.out.println("长方形的面积为:"+S2);
    }public static void zheng(double f){
        double S3=f*f;
        System.out.println("正方形的面积为:"+S3);
    }
}
